package com.coocaa.ops.common.tool.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author bijiahao
 * @date : 2019/6/24.
 * @description 正则匹配工具类
 *
 */
public class RegexUtil {

    private static Pattern p = Pattern.compile("^[\\u4e00-\\u9fa5]*$");

    /**
     * 是否中文
     *
     * @param inputStr
     * @return
     */
    public static boolean matchChinese(String inputStr) {
        Matcher matcher = p.matcher(inputStr);
        return matcher.matches();
    }

}
